<template>
  <div class="pc">
    <h1>{{ msg }}</h1>
    <h1>{{ "CP" }}</h1>
    <h1>{{ "ok" ? 'yes' : 'no' }}</h1>
    <h1 v-once>{{ once }}</h1>
    {{ test_add_html }}
    <div v-html="test_add_html"></div>
    <a v-bind:href="url">{{url_name}}</a>
    <button @click="go">跳转到第二个页面</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'HelloWorld,I am PC',
      once: 'only once',
      test_add_html: '<h1>hello/h1>',
      url_name: 'baidu',
      url: 'https://www.baidu.com'
    }
  },
  methods: {
    go () {
      this.$router.push({ path: '/secondPage' })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
